package nameless.aistudy.common.enumeration.operation;

public enum OperationTypeEnum {
    // 超管操作 (11)
    // 角色管理 (1101)
    SUPER_ADMIN_UPDATE_USER_ROLE(11_01_00_00_00_01L, "超级管理员修改用户角色"),

    // 管理员操作 (12)
    // 用户管理 (12_01)
    ADMIN_CREATE_USER(12_01_00_00_00_01L, "管理员创建用户"),
    ADMIN_GET_USER_LIST(12_01_00_00_00_02L, "管理员查询用户列表"),
    ADMIN_GET_USER_DETAIL(12_01_00_00_00_03L, "管理员查询用户详情"),
    ADMIN_UPDATE_USER(12_01_00_00_00_04L, "管理员修改用户信息"),
    ADMIN_DELETE_USERS(12_01_00_00_00_05L, "管理员批量删除用户"),

    // 日志管理 (12_02)
    ADMIN_GET_ADMIN_LOGS(12_02_00_00_00_01L, "管理员查询管理员操作日志"),
    ADMIN_GET_USER_LOGS(12_02_00_00_00_02L, "管理员查询用户操作日志"),

    // 学科管理 (12_03)
    ADMIN_CREATE_SUBJECT(12_03_00_00_00_01L, "管理员创建学科"),
    ADMIN_GET_SUBJECT_LIST(12_03_00_00_00_02L, "管理员查询学科列表"),
    ADMIN_UPDATE_SUBJECT(12_03_00_00_00_03L, "管理员修改学科配置"),
    ADMIN_DELETE_SUBJECTS(12_03_00_00_00_04L, "管理员批量删除学科"),

    // 学科-英语管理 (12_03_01)
    // 学科-英语-词汇模块管理 (12_03_01_01)
    // 学科-英语-词汇模块-词汇本管理 (12_03_01_01_01)
    ADMIN_ENGLISH_CREATE_VOCABULARY_BOOK(12_03_01_01_01_01L, "管理员创建英语词汇本"),
    ADMIN_ENGLISH_GET_VOCABULARY_BOOKS(12_03_01_01_01_02L, "管理员查询英语词汇本列表"),
    ADMIN_ENGLISH_UPDATE_VOCABULARY_BOOK(12_03_01_01_01_03L, "管理员修改英语词汇本"),
    ADMIN_ENGLISH_DELETE_VOCABULARY_BOOKS(12_03_01_01_01_04L, "管理员批量删除英语词汇本"),
    ADMIN_ENGLISH_ADD_WORDS_TO_BOOK(12_03_01_01_01_05L, "管理员向词汇本添加词汇"),
    ADMIN_ENGLISH_REMOVE_WORDS_FROM_BOOK(12_03_01_01_01_06L, "管理员从词汇本移除词汇"),

    // 学科-英语-阅读模块管理 (12_03_01_02)
    // 学科-英语-阅读模块-文章管理 (12_03_01_02_01)
    ADMIN_ENGLISH_CREATE_ARTICLE(12_03_01_02_01_01L, "管理员创建英语文章"),
    ADMIN_ENGLISH_GET_ARTICLES(12_03_01_02_01_02L, "管理员查询英语文章列表"),
    ADMIN_ENGLISH_UPDATE_ARTICLE(12_03_01_02_01_03L, "管理员修改英语文章"),
    ADMIN_ENGLISH_DELETE_ARTICLES(12_03_01_02_01_04L, "管理员批量删除英语文章"),

    // 用户操作 (13)
    // 认证 (13_01)
    USER_REGISTER(13_01_00_00_00_01L, "用户注册"),
    USER_LOGIN(13_01_00_00_00_02L, "用户登录"),
    USER_REFRESH_TOKEN(13_01_00_00_00_03L, "用户刷新令牌"),

    // 个人信息 (13_02)
    // 个人信息-基本信息 (13_02_01)
    USER_GET_PROFILE(13_02_01_00_00_01L, "用户查询个人信息"),
    USER_UPDATE_PROFILE(13_02_01_00_00_02L, "用户修改个人信息"),

    // 个人信息-综合统计 (13_02_02)
    // 个人信息-综合统计-打卡 (13_02_02_01)
    USER_CHECKIN(13_02_02_01_00_01L, "用户打卡"),
    USER_GET_CHECKIN_STATS(13_02_02_01_00_02L, "用户查询打卡统计"),

    // 个人信息-综合统计-学习时长 (13_02_02_02)
    USER_GET_STUDY_DURATION(13_02_02_02_00_01L, "用户查询学习总时长"),

    // 学科学习 (13_03)
    // 英语 (13_03_01)
    // 英语-综合模块 (13_03_01_00)
    // 英语-综合模块-统计 (13_03_01_00_01)
    USER_SUBJECT_ENGLISH_STATS_GET(13_03_01_00_01_01L, "用户查询英语学习统计"),

    // 英语-综合模块-学习计划 (13_03_01_00_02)
    USER_SUBJECT_ENGLISH_STUDY_PLAN_CREATE(13_03_01_00_02_01L, "用户创建学习计划"),
    USER_SUBJECT_ENGLISH_STUDY_PLAN_GET(13_03_01_00_02_02L, "用户查询学习计划"),
    USER_SUBJECT_ENGLISH_STUDY_PLAN_UPDATE(13_03_01_00_02_03L, "用户修改学习计划"),
    USER_SUBJECT_ENGLISH_STUDY_PLAN_SET_REMINDER(13_03_01_00_02_04L, "用户设置学习提醒"),

    // 英语-词汇模块 (13_03_01_01)
    // 英语-词汇模块-词汇本 (13_03_01_01_01)
    USER_SUBJECT_ENGLISH_VOCABULARY_BOOK_CREATE(13_03_01_01_01_01L, "用户创建个人词汇本"),
    USER_SUBJECT_ENGLISH_VOCABULARY_BOOK_GET_LIST(13_03_01_01_01_02L, "用户查询词汇本列表"),
    USER_SUBJECT_ENGLISH_VOCABULARY_BOOK_MERGE(13_03_01_01_01_03L, "用户合并词汇本"),
    USER_SUBJECT_ENGLISH_VOCABULARY_BOOK_DELETE_BATCH(13_03_01_01_01_04L, "用户批量删除词汇本"),
    USER_SUBJECT_ENGLISH_VOCABULARY_BOOK_ADD_WORDS(13_03_01_01_01_05L, "用户向词汇本添加词汇"),
    USER_SUBJECT_ENGLISH_VOCABULARY_BOOK_REMOVE_WORDS(13_03_01_01_01_06L, "用户从词汇本移除词汇"),

    // 英语-词汇模块-词汇 (13_03_01_01_02)
    USER_SUBJECT_ENGLISH_VOCABULARY_WORD_GET_LIST(13_03_01_01_02_01L, "用户查询词汇本词汇列表"),
    USER_SUBJECT_ENGLISH_VOCABULARY_WORD_GET_DETAIL_BY_ID(13_03_01_01_02_02L, "用户根据ID查询词汇详情"),
    USER_SUBJECT_ENGLISH_VOCABULARY_WORD_GET_DETAIL_BY_SPELL(13_03_01_01_02_03L, "用户根据拼写查询词汇详情"),
    USER_SUBJECT_ENGLISH_VOCABULARY_WORD_REFRESH_ASSOCIATION(13_03_01_01_02_04L, "用户刷新词汇联想技巧"),
    USER_SUBJECT_ENGLISH_VOCABULARY_WORD_UPDATE_MEMORY(13_03_01_01_02_05L, "用户更新单词记忆状态"),

    // 英语-词汇模块-统计 (13_03_01_01_03)
    USER_SUBJECT_ENGLISH_VOCABULARY_LEARNING_START(13_03_01_01_03_01L, "用户开始词汇学习"),
    USER_SUBJECT_ENGLISH_VOCABULARY_LEARNING_END(13_03_01_01_03_02L, "用户结束词汇学习"),
    USER_SUBJECT_ENGLISH_VOCABULARY_STATS_GET(13_03_01_01_03_03L, "用户查询词汇学习统计"),

    // 英语-阅读模块 (13_03_01_02)
    // 英语-阅读模块-文章 (13_03_01_02_01)
    USER_SUBJECT_ENGLISH_ARTICLE_SHARE(13_03_01_02_01_01L, "用户分享文章"),
    USER_SUBJECT_ENGLISH_ARTICLE_GET_LIST(13_03_01_02_01_02L, "用户查询文章列表"),
    USER_SUBJECT_ENGLISH_ARTICLE_GET_DETAIL(13_03_01_02_01_03L, "用户查询文章详情"),
    USER_SUBJECT_ENGLISH_ARTICLE_GET_TRANSLATION(13_03_01_02_01_04L, "用户查询翻译内容"),

    // 英语-阅读模块-统计 (13_03_01_02_02)
    USER_SUBJECT_ENGLISH_READING_START(13_03_01_02_02_01L, "用户开始阅读"),
    USER_SUBJECT_ENGLISH_READING_END(13_03_01_02_02_02L, "用户结束阅读"),
    USER_SUBJECT_ENGLISH_READING_STATS_GET(13_03_01_02_02_03L, "用户查询阅读统计"),

    // 英语-写作模块 (13_03_01_03)
    // 英语-写作模块-作文 (13_03_01_03_01)
    USER_SUBJECT_ENGLISH_WRITING_TOPIC_GENERATE(13_03_01_03_01_01L, "用户生成作文题目"),
    USER_SUBJECT_ENGLISH_WRITING_SUBMIT(13_03_01_03_01_02L, "用户提交作文"),
    USER_SUBJECT_ENGLISH_WRITING_GET_LIST(13_03_01_03_01_03L, "用户查询作文列表"),
    USER_SUBJECT_ENGLISH_WRITING_GET_DETAIL(13_03_01_03_01_04L, "用户查询作文详情"),
    USER_SUBJECT_ENGLISH_WRITING_UPDATE(13_03_01_03_01_05L, "用户修改作文"),
    USER_SUBJECT_ENGLISH_WRITING_GET_ANALYSIS(13_03_01_03_01_06L, "用户查询作文评价"),
    USER_SUBJECT_ENGLISH_WRITING_SAMPLE_GENERATE(13_03_01_03_01_07L, "用户生成范文"),
    USER_SUBJECT_ENGLISH_WRITING_SAMPLE_COLLECT(13_03_01_03_01_08L, "用户收藏范文"),

    // 英语-写作模块-统计 (13_03_01_03_02)
    USER_SUBJECT_ENGLISH_WRITING_START(13_03_01_03_02_01L, "用户开始写作"),
    USER_SUBJECT_ENGLISH_WRITING_END(13_03_01_03_02_02L, "用户结束写作"),
    USER_SUBJECT_ENGLISH_WRITING_STATS_GET(13_03_01_03_02_03L, "用户查询写作统计");




    private final long id;
    private final String description;

    OperationTypeEnum(long id, String description) {
        this.id = id;
        this.description = description;
    }

    public long getId() {
        return id;
    }

    public String getDescription() {
        return description;
    }

    // 可选：添加通过ID查找枚举的方法
    public static OperationTypeEnum fromId(long id) {
        for (OperationTypeEnum type : OperationTypeEnum.values()) {
            if (type.id == id) {
                return type;
            }
        }
        throw new IllegalArgumentException("无效的操作类型ID: " + id);
    }
}